Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO-1557 / Support Network Gateway #29

Merged
78 commits merged into from
Aug 9, 2023
Merged

DO-1557 / Support Network Gateway #29

78 commits merged into from
Aug 9, 2023

Conversation

ghost
Copy link

@ghost ghost commented Jun 28, 2023

New Features:

  • host_ip is suggested/defaulted to when running system config
  • added setupmode Gateway back into docker config and systemd config
  • rename binary to babylonnode
  • Gateway for systemd is run using a seperate docker compose file from the docker-compose in created with docker-config
  • chown on all newly generated files depending on the user that executes it.
  • upgrade docker-compose version

Includes refactoring for:

  • Config/Settings Classes renamed to Config
  • Classes in setup folder are now suffixed with Setup
  • Reworked commands for to_dict, to_yaml and to_file to be derived from BaseConfig class
  • Reworked the Docker configration and installation process to use the Config object instead of arbitrary dicts
  • Docker Config now uses to_dict, to_yaml and to_file derived from BaseConfig
  • Reduced config commands to parsing, questionary and output. The logic for asking questions should now be done inside the Setup classes. Currently its still spread over Setup and the Config object
  • Seperated Config Classes into their own respective files

@ghost ghost changed the title Do 1557 DO-1557 / Support Network Gateway Jun 28, 2023
@github-actions
Copy link

github-actions bot commented Jun 28, 2023

Test Results

44 tests  +7   31 ✔️ +5   17s ⏱️ -6s
  1 suites ±0   13 💤 +2 
  1 files   ±0     0 ±0 

Results for commit 794b2be. ± Comparison against base commit bff6a76.

This pull request removes 4 and adds 11 tests. Note that renamed tests count towards both.
tests.test_config.ConfigUnitTests ‑ test_config_docker_defaut_config_matches_fixture
tests.test_config.ConfigUnitTests ‑ test_config_systemd_defaut_config_matches_fixture
tests.test_systemd.SystemdUnitTests ‑ test_docker_config
tests.test_systemd.SystemdUnitTests ‑ test_docker_config_all_local
tests.test_docker.DockerUnitTests ‑ test_docker_config
tests.test_docker.DockerUnitTests ‑ test_docker_config_all_local
tests.test_docker.DockerUnitTests ‑ test_docker_settings_roundtrip
tests.test_gateway_setup.GatewaySetupTests ‑ test_setup_docker_compose_with_gateway
tests.test_gateway_setup.GatewaySetupTests ‑ test_setup_gateway_ask_core_api
tests.test_gateway_setup.GatewaySetupTests ‑ test_setup_gateway_compose_file_fixture_test
tests.test_gateway_setup.GatewaySetupTests ‑ test_setup_gateway_get_CoreApiAddress
tests.test_systemd.SystemdUnitTests ‑ test_systemd_settings_random
tests.test_systemd.SystemdUnitTests ‑ test_systemd_settings_random2
tests.test_systemd.SystemdUnitTests ‑ test_systemd_settings_random3
…
This pull request skips 2 tests.
tests.test_monitoring.MonitoringTests ‑ test_monitoring_config
tests.test_monitoring.MonitoringTests ‑ test_template_failure

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 28, 2023

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3753 2312 62% 0% 🟢

New Files

File Coverage Status
node-runner-cli/config/CommonSystemDConfig.py 82% 🟢
node-runner-cli/config/CoreApiNodeConfig.py 100% 🟢
node-runner-cli/config/CoreDockerConfig.py 93% 🟢
node-runner-cli/config/CoreSystemDConfig.py 84% 🟢
node-runner-cli/setup/DockerCommandArguments.py 93% 🟢
node-runner-cli/setup/DockerCompose.py 57% 🟢
node-runner-cli/setup/DockerSetup.py 49% 🟢
node-runner-cli/setup/GatewaySetup.py 95% 🟢
node-runner-cli/setup/SystemDCommandArguments.py 93% 🟢
node-runner-cli/tests/test_diff_human_readable.py 100% 🟢
node-runner-cli/tests/test_docker.py 89% 🟢
node-runner-cli/tests/test_gateway_setup.py 90% 🟢
TOTAL 85% 🟢

Modified Files

File Coverage Status
node-runner-cli/api/Api.py 59% 🟢
node-runner-cli/api/CustomAPIClient.py 47% 🟢
node-runner-cli/commands/authcommand.py 53% 🟢
node-runner-cli/commands/coreapi.py 100% 🟢
node-runner-cli/commands/dockercommand.py 49% 🟢
node-runner-cli/commands/key.py 76% 🟢
node-runner-cli/commands/ledgercommand.py 29% 🟢
node-runner-cli/commands/monitoring.py 29% 🟢
node-runner-cli/commands/othercommands.py 89% 🟢
node-runner-cli/commands/systemapi.py 56% 🟢
node-runner-cli/commands/systemdcommand.py 49% 🟢
node-runner-cli/config/BaseConfig.py 84% 🟢
node-runner-cli/config/DockerConfig.py 93% 🟢
node-runner-cli/config/GatewayDockerConfig.py 100% 🟢
node-runner-cli/config/Genesis.py 72% 🟢
node-runner-cli/config/KeyDetails.py 100% 🟢
node-runner-cli/config/MigrationConfig.py 50% 🟢
node-runner-cli/config/MonitoringConfig.py 26% 🟢
node-runner-cli/config/Nginx.py 100% 🟢
node-runner-cli/config/SystemDConfig.py 46% 🟢
node-runner-cli/github/github.py 71% 🟢
node-runner-cli/monitoring/init.py 40% 🟢
node-runner-cli/tests/test_api.py 62% 🟢
node-runner-cli/tests/test_config.py 87% 🟢
node-runner-cli/tests/test_monitoring.py 64% 🟢
node-runner-cli/tests/test_network.py 90% 🟢
node-runner-cli/tests/test_systemd.py 87% 🟢
node-runner-cli/tests/test_validator.py 93% 🟢
node-runner-cli/utils/Network.py 93% 🟢
node-runner-cli/utils/PromptFeeder.py 98% 🟢
node-runner-cli/utils/Prompts.py 69% 🟢
node-runner-cli/utils/utils.py 55% 🟢
node-runner-cli/version/init.py 100% 🟢
TOTAL 70% 🟢

updated for commit: 794b2be by action🐍

@ghost ghost marked this pull request as ready for review June 30, 2023 07:36
@@ -0,0 +1,66 @@
version: '3.8'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need another file? We were constructing the standalone configuration based on the node config

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shambupujar It is possible to use the same file.
My concern was that the template could become to complex when adding more if/else that would stop the core node and nginx from starting.

@ghost ghost merged commit b155e95 into main Aug 9, 2023
12 checks passed
@ghost ghost deleted the DO-1557 branch September 16, 2023 12:33
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants